﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using KPIS.GERP.GBMS.BLL;
using KPIS.GERP.GBMS.IBLL;
using KPIS.GERP.GBMS.MODEL;
using Telerik.Web.UI;

namespace KPIS.GERP.GBMS.APP_UI.UserControls
{
    public partial class ProjectControl : System.Web.UI.UserControl
    {
        private ProjectControl_BLL ctrl = new ProjectControl_BLL();

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public void LoadData(string strBgmYear, string strSubActSeq, string strBgmSourceSeq
            , string strJobsiteSeq, string strBgmExpGrpSeq, string strMode)
        {
            hBgmYear.Value = strBgmYear;
            hSubActSeq.Value = strSubActSeq;
            hBgmSourceSeq.Value = strBgmSourceSeq;
            hJobsiteSeq.Value = strJobsiteSeq;
            hBgmExpGrpSeq.Value = strBgmExpGrpSeq;

            DataTable dtb = ctrl.GetFull(strBgmYear, strSubActSeq, strBgmSourceSeq, strJobsiteSeq, strBgmExpGrpSeq);

            if (dtb.Rows.Count > 0)
            {
                hBgmProjCtrlSeq.Value = dtb.Rows[0]["bgm_proj_ctrl_seq"].ToString();
            }
            else
            {
                hBgmProjCtrlSeq.Value = "";
            }

            if (strMode == "Plus")
            {
                cmdInsert.Text = "ดึงเงินจากกองกลาง";
            }
            else
            {
                cmdInsert.Text = "คืนเงินเข้ากองกลาง";
            }
        }

        protected void cmdInsert_Click(object sender, EventArgs e)
        {

        }

        protected void cmdCancel_Click(object sender, EventArgs e)
        {

        }
    }
}